Fixing warnings after using more competitive solution than original