Fixed bug in position script