Fixed binding issue with compile template