database installation script: fixed some errors