Some more bug fixing stuff.