Fix resolution bugs

Resolves #66 and #43.