most logical bugs fixed