Fix opacity functionality