Issues #487, #488 fixed