fixed variable type so it works for non-x86 architectures