fixes #280 and improves how flash is rendered