Fixed duplicate code block