fixed issue with interval not working