Fixed bugs related to lib and script paths