Fix #497
Fix #496