Remove callback on main function