Fixed if/elseif on times.