some more bugs fixed