fix a few implicit conversion warnings

This fixes all warnings I currently have (as described in #49).