Few small fixes, specifically in the context of making Spock work, but generally applicable.