some small fixes

I'm sorry for the mixed content, I intended to implement some integration with teamcity but it's taking some time so I cut out these fixes I did while working on the teamcity integration.
The commits are pretty small so I think they should not be to hard to figure out what they do.