Fixed misc. build errors