adding deactivation path and fixing inactive search now that we are using postgres