Fixed all issues with flash