one trivial and one subtle (http://stackoverflow.com/a/12187709/213114) fix