fixed some bugs, added several warnings for a user incorrect actions