2 important bugs fixed