fix bug in elements