Fix bug in gs-impl