fix fatal error by Mr Hung