GEP-51 bug fixes and modifications