Cleaned up fix for #143