Added various fixes in AMP device_vector