more small changes

added some more small changes and an error message.