solved two bugs