I'm having problems doing this with 6.5 (dp 1) although there are no problems with the same script in 6.1.1.