Some bugs have been corrected