- Improved shape_get_def code