many hidden bugs fixed