Fixed malfunctioning tests

Error was actually passed to the done handler
causing the test to fail while it should in fact succeed.
Also, it is not necessary to catch an error in fail in some
cases as it shadows the information about where did the error occur.