Some changes, bugfix needed at interval function.