Fixes based on conversation with @nicolashery