Fixed the error propagation on the 'begin' function.