Two fixes, thanks to Simetrical