fixes for state template