Last second changes for bugfixing shifting logic