fixed a few bugs and messages