fixing bugs etc