Fixed bugs with alarm and fork.