Bug cleanup