Fixing timer crash