Revert, bad issue number and some mistakes in code

Please see comments for more informations.
This reverts commit b6647115bd237a076bc05abaebf618ac43cc6565.