Added simple error conditions