Remove deprecated window.dirtyCheck(); use Platform.flush() instead. Fixes issue #10