Fixed roomines calculation and templates dubling