Better path handling