Fixes minor bugs from refactor

Change-Id: I8797b25af6b27a0e7a4387e5d88a3f7b8e0772e6