fixed some Java warnings
fixed problem when creating transactions with negative amount from template