Fixed callback logic.