Fix Repetad code blocks