Fixed duplication of functionality