minor bug fixes and working on flash issues