several bugs and improvements
several bugs and improvements