minor  bugs fixed