Fixed prefix getting method, fixed '0' vs NULL in manually added payments.

Signed-off-by: dradancer <kuba.zarybnicky@post.cz>