A couple of fixes

Here are a couple of fixes.. 

Another question, does this in its current state work for you?