Updating position on move
fixing js reference