bugs fixed slightly