Almost working peripheral; crashes on startup