Fixed issues from toopy's merge