Fixed bad call in case of error