Fix for #1676

I don´t know if I covered everything.