Fix bugs with step 6