removed unnecessary breaks on error