Update MainService.java

Bug Fix AG