Fixes #321 threadsperpage/postsperpage negative value SQL error

#321 1.6