Issue/555 categories fix

Core modules should be OK now. Plugin modules still work too, but bug #555 will affect them as long as they won't be fixed.