fix height not always being set correctly