Fix bug in time check

Signed-off-by: Atanas Kerezov <kerezov.atanas@gmail.com>