Fixed functions that were wrongly static