Fix for #1223

This is still broke.
I updated the commit and added the missing line, what do you mean?