Quick fix for some ugly error cases