Dirty fix for preserving cwd and base