Fix for element extraction