Fixed database.autoConnect behaviour for web applications.