optical fixes, added missing test