app_remove() bugfix