Fixed some warnings about unused return values