Fixed the implementation