fix several capability bugs