Fix #461 & #462