improvements regarding #496

I think so. Thank you for fixing this bug for me.