RB4 is an open collector pin if you want to use it as output you have to pullup it by using resistor 10K to +5V
Hope this help
RB4 Bidirectional I/O port. It has a schmitt trigger input, as well as being the low voltage programming input pin. not open collector output.
If in low voltage programming mode then it a input.