Fixed some flash bugs