cleanup status and fix bugs