Bug fix and added apiserver script