fixes based on @brianpalma feedback