fix #478 and another bug + tidy up requestType