Fixed some bugs

Still many problems to solve