Fixed issue with database code throwing an illegal argument exception