Fixed duplicate code. Issue with merging new code.