fixes element bug