Fixed execution of cell magics so that post_execute is called once