few small bugs fixed