return error prototypes construction back, due to problems with instanceof