fix stage being placed outside if-block, fix stupid message template