fixing done being called twice