Buggy seclevs implementation

Master, if you can fix it, awesome.