bug fixings