Fix for time directive when no nested scopes
Cleanup