Fix various bugs in blade