Fixed the shift issue

More testing is required