Fixed double close of loader