added missing assertion check to other functions.