fixing data types for postgres