Fix plan bug