FIXING BUGS