Fix callbacks and clear intervals