Cleaned up fix for #31