Removed unnecessary flushData call