better messages and fixed a bug