Recovered functionality

Fixed stuff that was lost