Resolved bug when error data is returned