some base path related bug fixes
Merge commit 'ca3b2bf1b5ddf551d60e4a5339b3e70229bd41d1' into 7.x-stable