fixed issues in HSL conversion fxn