small fixes, making sure that all errors are reported inside rest