Fix for closeAfterAdd and clearAfterAdd when they set to true and reloading is on.