bugfix and add siganture verification