Minor changes that had to be adapted when compiling it in to a lib