NPE in tick handler. Fixes #2