fixed an issue with PORTB bit manipulation