fixes #419 - issues with magic mode
rebuilt