Slight tweak in add_application