fixed a bug in amazon repository class