Fix opacity bug. Fixes #608