fixed some bugs with using apps