WIP - fixed the -z stuff