Bugfixes with position handling