fix js error (Uncaught TypeError: Object #<it> has no method
'getPosition')