fixes bugs when starting from scratch