Fixed no duration in seconds issue

is not none doesn't work with dict, us  in keys()