Fixed bug for inserting users into db