fixed problem with double in mysql and postgres