fix registration stuff