Fix #382
Fix #451
Fix #446