temp fix to return error directly