fix for extract bits