Fixed broken functions

Fix some broken functions