both bugs fixed