Fixed several bugs, added combining error handlers