Fixing some problems I3fdc729670a0d4046c707be60429290a6620571a

Change-Id: Id38d8236bdfdb1a6a91f46350ac8b62c89581051