fixed fingerprint bugs with templates