Some fixes for flash