Added height check and auto placing