Issue/postgres arrays

Basic quick fix for #1683 . 

An explanation of the problem is in the issue, as well as a gist showing the problem.

Sorry it took so long for me to get back around to this. If there's anything else needed, or if you have a better way of fixing this let me know.