fixed bug in retrieving fresh sunrise time; logic for locking interface