fixed regex bug and changed :top/:bot semantics