Fail to restore backup website

Whenever I try to restore a website I get the following error:

HTTP/1.0 500 Perl execution failed Server: MiniServ/0.01 Date: Thu, 7 Jun 2007 08:59:16 GMT Content-type: text/html Connection: close

Error - Perl execution failed
Modification of non-creatable array value attempted, subscript -1 at /usr/libexec/webmin/postfix/postfix-lib.pl line 704.

and I have no idea what is causing it, Restore worked at one point but now it doesnt, doesnt matter if I use a restore from a eariler version of virtualmin or the latest same error happens

I checked the file and it seems to be related to maps in postfix, but I have disabled mails for domains, so I dont know what can be causing this.

Before this error happened, the restore feature had problems with mysql databases where it would fail restore a database that had "-" and at one point ".gz" in the database name, invalid syntax or something simular for both issues.

Status: 
Closed (fixed)