Fixes #1058

https://github.com/CartoDB/cartodb/issues/1058