fixed issues (#409, #447)