fixed expansion bug