change transparency function to avoid no default 'alpha bug.