fix bug

thanks daniel