Fixes callback parameter access and condition