Bug Fixes, Changed to posgres 9.3