added a couple of fixes