Small changes and one bug in template solved