Added more error raising