More important function fixes