moved app lock to include all of remove_app