fixed some layout issues after resize