fixes from MikeNG's repos (thanks bro)

Change-Id: I5875c82493091e76c7cf3537acbdffdf5be1c547