[PATCH] Fix bit reversion function