Fixed getPath implementation