transparency fix

fix transparency bug
some code improvements