Fixes at Xaekai's request