removed bug for undefined