Handle subdirectory better