Clean up bugs