Improve autoheight plugin