fixes error case