Fixing define functions