rmoved some bugs