Fix shape constructors in response to the new shapes API, please refer to 9c171f00188a978b311c20fc7a2487a3a495d57b