Few minor bugs cleaned up