fixed all easily identifyable bugs