Fixed issues reported by cure53.de

Fixed issues CLP-01-014 and CLP-01-015