solved the bugs