Fixed some errors
fixed bug