Fix 64bit shifts - patch from Kim Lindberg Schwaner