Oups...
Add
Code:
OPTION_REG.7=0
At the top of your code, this should enable the internal Weak-pull-up on PORTB. Make sure you place this code line at least under the TRISB=xxxxxxxx line.. if there's any