two small bugs fixed