Error patch

Fixed conflicts in #774