Some more fixes and dependency between bonus<->sql_patches