fixes here and there; SPL might be broken