fixed error's, now running in SP without error