Fixed partition script to be usable