Applyed suggestions from @fabpot and @stof