Fixed raise error not raising