Bugfix and timer fix