Error raising fixes