corrected getCurrentPosition method