fix to permalink generation
if has parent still check if url