Fixed a bug when instead on query execute error the error message was replaced with nil