Fixed resource leak in Service