Changed to proper error type