fixed bug in medium tamplate