Test functions fixed