Fixed Calendar issue when HOUR = 0. Changes made to make app fit
Activity lifecycle.