Fixed getPosition crash