fixed use of type as field name for requests table