Fixing work with null elemnts