Step 2 - fixed bugs