Fix register error, fix posts controller tests