add support for app running in a subdirectory