bugfix wrong return codes