Updated with more error codes