fix on __end()