Fixes error "All control paths should return a value". Change-Id: I4178ee4b644cd54629bd2a2f4c57eb58d2709ab8