Fix for rails for(tested on postgresql)