fixed some dynamic resize issues