Write register values now works