Fixing result handler bug