Fixed bug in AMD export