Removed unused if
Docs generation