small fix for library calls and added access to server variable