Fixed issue with working directories on custom commands