fixing shift problem