Fix ls apps check