Fixed minor bit order issues