Fixed errors on swap creation.