PORTB have some analog stuff multiplexed with..
you need to add
Code:
ADCON1=$0F
at the top of your code to disable ADCs.

BUT you could also edit the config fuses as well.